package com.ruoyi.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ruoyi.order.domain.GoodsOrderInfo;
import com.ruoyi.order.mapper.GoodsOrderInfoMapper;
import com.ruoyi.order.service.IGoodsOrderInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 卖品订单信息Service业务层处理
 *
 * @author HHAOYU
 * @date 2021-01-16
 */
@Service
public class GoodsOrderInfoServiceImpl extends ServiceImpl<GoodsOrderInfoMapper, GoodsOrderInfo> implements IGoodsOrderInfoService {
    @Autowired
    private GoodsOrderInfoMapper goodsOrderInfoMapper;

    /**
     * 查询卖品订单信息
     *
     * @param id 卖品订单信息ID
     * @return 卖品订单信息
     */
    @Override
    public GoodsOrderInfo selectGoodsOrderInfoById(Long id)
    {
        return goodsOrderInfoMapper.selectGoodsOrderInfoById(id);
    }

    /**
     * 查询卖品订单信息列表
     *
     * @param goodsOrderInfo 卖品订单信息
     * @return 卖品订单信息
     */
    @Override
    public List<GoodsOrderInfo> selectGoodsOrderInfoList(GoodsOrderInfo goodsOrderInfo)
    {
        return goodsOrderInfoMapper.selectGoodsOrderInfoList(goodsOrderInfo);
    }

    /**
     * 新增卖品订单信息
     *
     * @param goodsOrderInfo 卖品订单信息
     * @return 结果
     */
    @Override
    public int insertGoodsOrderInfo(GoodsOrderInfo goodsOrderInfo)
    {
        return goodsOrderInfoMapper.insertGoodsOrderInfo(goodsOrderInfo);
    }

    /**
     * 修改卖品订单信息
     *
     * @param goodsOrderInfo 卖品订单信息
     * @return 结果
     */
    @Override
    public int updateGoodsOrderInfo(GoodsOrderInfo goodsOrderInfo)
    {
        return goodsOrderInfoMapper.updateGoodsOrderInfo(goodsOrderInfo);
    }

    /**
     * 批量删除卖品订单信息
     *
     * @param ids 需要删除的卖品订单信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderInfoByIds(Long[] ids)
    {
        return goodsOrderInfoMapper.deleteGoodsOrderInfoByIds(ids);
    }

    /**
     * 删除卖品订单信息信息
     *
     * @param id 卖品订单信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderInfoById(Long id)
    {
        return goodsOrderInfoMapper.deleteGoodsOrderInfoById(id);
    }
}
